/**
 * Created by Lin Hui on 2016/12/13.
 */
+function($){
    $.extend({
        geek:{
            edit:function(){
                laydate({elem:'#time', format:'YYYY-MM-DD hh:mm:ss',istime: true});
                //初始化富文本
                CKInit('article-content');
                //上传按扭
                $('button.upload').click(function(){
                    var options = {
                        name:'uploadimage',
                        url:'http://upload.qiniu.com',
                        type:['png', 'jpg','jpeg', 'gif'],
                        preview:'.preview-upload',
                        token:QINIU.token,
                        input:'input[name="thumb"]',
                        success:function(resp){
                            QiniuUploadSuccessHandle(resp, this);
                        },
                        error:function(resp){
                            uploadErrorHandle(resp, this);
                        }
                    };
                    qiniuUpload(options);
                });

            },
            thumb:function() {

            }
        }
    });
}(jQuery);